
/**
 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Autogenerated file -- DO NOT EDIT!

#include <array>
#include <memory>
#include <unordered_map>
#include "macros.h"
#include "source_lang_enum.h"
#include "verification/plugins.h"
#include "verification/default_plugin.h"
<%= Common::include_plugin_files "Verification", "header" %>

// NOLINTBEGIN(fuchsia-statically-constructed-objects)
namespace ark::verifier::plugin {

% Common::each_plugin_suboption("Verification", "plugin_class") do |plugin_class, plugin_lang|
// NOLINTNEXTLINE(readability-identifier-naming)
static <%= plugin_class %> <%= plugin_lang %>_PLUGIN;
% end
static DefaultPlugin g_dflt;

static std::unordered_map<panda_file::SourceLang, Plugin const *> const PLUGINS_MAP {
% Common::each_plugin_suboption("Verification", "plugin_class") do |_, plugin_lang|
%   short_plugin_lang = plugin_lang == "JAVA" ? "JAVA_8" : plugin_lang
  { panda_file::SourceLang::<%= short_plugin_lang %>,
    &<%= plugin_lang %>_PLUGIN },
% end
  { panda_file::SourceLang::PANDA_ASSEMBLY, &g_dflt}
};

// NOLINTEND(fuchsia-statically-constructed-objects)
Plugin const *GetLanguagePlugin(panda_file::SourceLang lang)
{
    if (PLUGINS_MAP.count(lang) > 0) {
        return PLUGINS_MAP.at(lang);
    }
    return &g_dflt;
}

} // namespace ark::verifier::plugin
